<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>

    // 自己定义函数，用来接受结果
    // function getgoods(results) {
    //     console.log(results);
    // }

    function a(results) {
        console.log(results);
    }

    setTimeout(() => {

        // 10s之后在获取资源

        // 思考script标签 10s之后再出现？？
        // 创建标签
        let  script=document.createElement("script")
      
        // 设置src
        // script.src="http://localhost:3000/goods?callback=getgoods"
        script.src="http://localhost:3000/goods?callback=a"
        // console.log(script);

        
        // 追加到页面中 (填充padding)
        // console.log(document.body);
        document.body.appendChild(script )


    }, 2000)




</script>
<!-- <script src="http://localhost:3000/goods"></script> -->